#ifndef CCONFIG_H
#define CCONFIG_H

#include "CFileUtils.h"

#include <boost/serialization/serialization.hpp>
#include <boost/serialization/split_member.hpp>
#include <boost/serialization/map.hpp>
#include <boost/serialization/string.hpp>

class CCFile;

class CConfig
{
private:
	friend class boost::serialization::access;
	template<class Archive>
	void save(Archive & ar, const unsigned int version) const
	{
		//ar & BOOST_SERIALIZATION_NVP(m_cachedFiles);	
	}

	template<class Archive>
	void load(Archive & ar, const unsigned int version)
	{
		//ar & BOOST_SERIALIZATION_NVP(m_cachedFiles);
	}

	BOOST_SERIALIZATION_SPLIT_MEMBER()

public:
	CConfig( bfs::path = cconfigPath() );
	~CConfig(void);

	void addFile( CCFile * inputFile );
	bool isTracked( CCFile * inputFile );	

	bool loadConfig();
	bool saveConfig();

private:
	bfs::path m_configPath;
	std::map< std::size_t, std::string > m_cachedFiles;
};

BOOST_CLASS_VERSION(CConfig, 1)

#endif